//
//  DHNetworkManager.h
//  宏达APP
//
//  Created by DIANGHONG on 2018/4/27.
//  Copyright © 2018年 123. All rights reserved.
//

#import "AFHTTPSessionManager.h"
#import "DHUserAccount.h"
//方法枚举
typedef NS_ENUM(NSInteger ,MethodHTTP){
    MethodGet,
    MethodPost
};

@interface DHNetworkManager : AFHTTPSessionManager

@property(nonatomic ,copy)NSString *qq;

@property(nonatomic ,strong)DHUserAccount *userAccount;

//@property(nonatomic ,strong)DHUserAccount *account;

/**
 单例实例化方法

 @return DHNetworkManager
 */
+ (instancetype)shareManager;
/*
 封装上传数据的方法
 */
- (void)uploadWithUrlString:(NSString *)urlString dataList:(NSArray *)dataList nameList:(NSArray *)nameList params:(NSDictionary *)params completion:(void(^)(id json, BOOL isSuccess))completion;
/**
 用一个函数网络封装请求GET、POST的方法

 @param method 请求方法 GET/POST
 @param urlStr url
 @param params 参数
 @param completion 完成回调
 */
- (void)requestWithMethod:(MethodHTTP)method UrlString:(NSString *)urlStr params:(NSDictionary *)params completion:(void(^)(id json ,BOOL isSuccess))completion;
@end
